home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / pc_board / didtst11.zip / PROUT1.BAT < prev    next >
DOS Batch File  |  1992-02-04  |  4KB  |  118 lines

  1. @echo off
  2. rem -- DidTest.COM by Dave Navarro, Jr.
  3. rem -- Prevents same file from being tested twice.
  4. didtest %2 %PCBDRIVE%%PCBDIR%\DIDTEST.LOG
  5. if errorlevel==1 goto end
  6.  
  7. rem -- GOTO 4TESTEXT if you are running 4DOS or NDOS
  8. rem -- GOTO TESTEXT if you are running MSDOS, DR-DOS or PC-DOS
  9. goto 4testext
  10.  
  11. rem -- Process a single upload file - for ProDOOR 3.44
  12. rem -- Passed Parameters:
  13. rem -- * %1  Log File
  14. rem -- * %2  File to Test
  15. rem -- * %3  COM Port
  16. rem -- * %4  Conference
  17. rem -- * %5  PLAY Directory
  18. rem -- ** See PROUTEST.BAT if you want to add new parameters or change the **
  19. rem -- ** order of the current passed parameters.                          **
  20.  
  21. rem -- Determine file type and branch to proper test case using TESTFILE.EXE
  22. :testext
  23. testfile gif zip arj lzh
  24. if errorlevel == 4 goto gif
  25. if errorlevel == 3 goto zip
  26. if errorlevel == 2 goto zip
  27. if errorlevel == 1 goto zip
  28. goto unknown
  29.  
  30. rem -- Determing file type and branch to proper test case using 4DOS commands
  31. :4testext
  32. if %@ext[%2] == gif goto gif
  33. if %@ext[%2] == zip goto zip
  34. if %@ext[%2] == arj goto zip
  35. if %@ext[%2] == lzh goto zip
  36. goto unknown
  37.  
  38. rem -- All unknown file types are moved to the HOLD directory for
  39. rem -- review by the sysop.  If it's a "postable" file, the user
  40. rem -- will be given credit.
  41. :unknown
  42. proecho %3 File type unknown!  Moving Offline for Review..~
  43. mov %2 h:\hold
  44. goto end
  45.  
  46. rem -- Test GIF file using GIFTEST by Dave Navarro, Jr.
  47. rem -- * /A   forces the GIF to be made a private upload, even in public
  48. rem -- *      upload conferences.
  49. rem -- * /B:3 tells GIFtest were running ProDoor 3.44 dated after 12/31/91
  50. rem -- * /D   tells GIFtest to do CRC duplicate checking.
  51. rem -- * /E   tells GIFtest to erase any GIF which is Invalid, a Duplicate,
  52. rem -- *      or does not meet the minimum resolution.
  53. rem -- * /F:  tells GIFtest where to find the description file to modify.
  54. rem -- * /L   tells GIFtest to log all GIF information to GIFLOG in the
  55. rem -- *      current directory
  56. rem -- * /M:  tells GIFtest to invalidate any GIFs which are not at least
  57. rem -- *      321x201x16 in resolution.
  58. rem -- * /P:  tells GIFtest to send all output to the COM port as well as
  59. rem -- *      to the screen.
  60. rem -- ** There are other parameters available, see GIFtest for more info **
  61. :gif
  62. giftest %2 /A/B:3/D/E/F:%PCBDRIVE%%PCBDIR%\$DOOR.NAM/L/M:321x201x16/P:%3
  63. goto end
  64.  
  65. rem -- Test Archives using ZipLab Plus by Jeffrey S. Morley
  66. rem -- ZipLab Plus tests ZIP, ARJ, and LZH files
  67. rem -- * The SET PCBDOOR=PRODOOR command let's ZPLUS know that we
  68. rem -- * are running ProDoor instead of PCBoard.
  69. rem -- * If any file is deleted, moved or renamed, you MUST delete
  70. rem -- * the DSZLOG file in order for ProDoor to work properly.
  71. :zip
  72. ptest %2 %PCBDRIVE%%PCBDIR%\PTEST.CFG
  73. if errorlevel==1 del %2
  74. if not exist %2 del %dszlog%
  75. if not exist %2 goto end
  76. goto diz
  77.  
  78. rem -- Search for FILE_ID.DIZ using ProDIZ by Dave Navarro, Jr.
  79. rem -- If one is found, import it as the description.
  80. rem -- ProDIZ supports ZIP, ARJ, and LZH files
  81. rem -- * /AV tells PRODIZ to add the AV serial number to the description
  82. rem -- *     of any ZIP files that contain one.
  83. rem -- * /D  tells PRODIZ to include the number of files in the archive
  84. rem -- *     and the oldest/newst file dates.
  85. rem -- * /U  tells PRODIZ to include the uncompressed size of the archive
  86. rem -- * in the description.
  87. :diz
  88. proecho %3 ~Searching for FILE_ID.DIZ...~
  89. prodiz %2 %PCBDRIVE%%PCBDIR%\$door.nam /d /u /av
  90.  
  91. rem -- GOTO 4ISZIP if you are running 4DOS or NDOS
  92. rem -- GOTO ISZIP if you are running MSDOS, DR-DOS, or PC-DOS
  93. goto 4iszip
  94.  
  95. rem -- test archive extension again using 4DOS commands
  96. :4iszip
  97. if %@ext[%2] == zip goto end
  98. goto end
  99. goto tozip
  100.  
  101. rem -- test archive extension using TESTFILE.EXE
  102. :iszip
  103. testfile zip
  104. if errorlevel == 1 goto end
  105. goto tozip
  106.  
  107. rem -- Convert any archive which is not a ZIP to ZIP format using
  108. rem -- AC (Archive Convert) by Donald Langhorn.
  109. rem -- Requires CDD command in 4DOS or CDTO.COM program (public domain)
  110. :tozip
  111. proecho %3 ~Converting to ZIP format...~
  112. CDD %5
  113. ac /z %2
  114. cdd d:\prodoor
  115. if exist %dszlog% del %dszlog%
  116.  
  117. :end
  118.